package com.hzw.saas.api.schedule;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hzw.saas.api.schedule.bo.UserScheduleBo;
import com.hzw.saas.api.schedule.bo.UserScheduleViewBo;
import com.hzw.saas.api.schedule.query.*;

import java.util.List;
import java.util.Set;

/**
 * The interface User schedule service.
 *
 * @author hankun
 */
public interface IUserScheduleService {


    /**
     * 新增日程任务
     *
     * @param userScheduleAddQuery the user schedule add query
     * @return the response entity
     */
    Boolean addSchedule(UserScheduleAddQuery userScheduleAddQuery);

    /**
     * 新增日程任务(批量)
     *
     * @param userScheduleAddQuery the user schedule add query
     * @param userIds              the user ids
     * @return the response entity
     */
    Boolean addBatchSchedule(UserScheduleAddQuery userScheduleAddQuery, Set<String> userIds);

    /**
     * 修改日程任务(包括移除 -> 转移到垃圾箱中)
     *
     * @param userScheduleUpdateQuery the user schedule update query
     * @return the response entity
     */
    Boolean updateSchedule(UserScheduleUpdateQuery userScheduleUpdateQuery);

    /**
     * 获取日程任务
     *
     * @param userScheduleQuery the schedule query
     * @param page              the page
     * @return the schedule
     */
    IPage<UserScheduleBo> getSchedule(UserScheduleQuery userScheduleQuery, Page<UserScheduleBo> page);

    /**
     * 完成日程任务
     *
     * @param checkQuery the check query
     * @return the response entity
     */
    Boolean check(UserScheduleCheckQuery checkQuery);

    /**
     * 删除日程任务
     *
     * @param pidList the pid list
     * @param userId  the user id
     * @return the response entity
     */
    Boolean deleteByIds(List<String> pidList, String userId);


    /**
     * 获取视图下的日程任务数据
     *
     * @param userScheduleViewQuery the user schedule view query
     * @return the schedule view
     */
    List<UserScheduleViewBo> getScheduleView(UserScheduleViewQuery userScheduleViewQuery);

    /**
     * 会议冲突检查.
     *
     * @param meetingClashQuery the meeting clash query
     * @return the list
     */
    List<String> checkMeetingClash(UserMeetingClashQuery meetingClashQuery);
}
